precision mediump float;
uniform samplerCube u_texture;
uniform vec3 u_camera_pos;
varying vec4 vColor;
varying vec2 v_uv;
varying vec4 v_NormalW;
varying vec4 v_posW;

void main()
{
	//gl_FragColor = vColor;
	//gl_FragColor =  vec4(1.0, 0.0, 0.0, 1.0);
	
	// Calculate(ToEye);

	vec3 v_toEye =  u_camera_pos - v_posW.xyz;
	
	vec3 V = reflect(normalize(-v_toEye),normalize(v_NormalW.xyz));
	gl_FragColor = textureCube(u_texture,V);
	
	//gl_FragColor = vec4(0.8, 0.0, 0.0, 1.0);
	
}
